<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>父级节点</title>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
    </ul>
    <div class="demo">
        <div class="box">
            <span class="erweima">
                x
            </span>
        </div>
    </div>

    <script>
        // 1. 父节点 
        var erweima = document.querySelector('.erweima')
        //  得到的是里元素最近的父级节点（亲爸爸） 找不到则返回 null
        console.log(erweima.parentNode);
    </script>
</body>
</html>